//
//  SecondCollectionCell.m
//  TinyFortune
//
//  Created by lc on 16/6/11.
//  Copyright © 2016年 lc. All rights reserved.
//

#import "SecondCollectionCell.h"

@implementation SecondCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.leftView.layer.masksToBounds = YES;
    self.rightLabel.layer.masksToBounds = YES ;
    self. leftView.layer.cornerRadius = 5 ;
    self.rightLabel.layer.cornerRadius = self.rightLabel.frame.size.width/2.0f;
    self.backgroundColor = [UIColor colorWithRed:239/255.0f green:239/255.0f blue:244/255.0f alpha:1];
    self.ImageView.layer.masksToBounds = YES;
    self.ImageView.layer.cornerRadius = 10;
}
- (void)setModel:(discoveryModel *)model{
    _model = model;
 
    [_ImageView sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:[UIImage imageNamed:@"networkWaiting"]];
    _titleView.text = model.name;
    _addressLabel.text = model.address;
    _descLabel.text = model.desc;
    _distanceLabel.text =[NSString stringWithFormat:@"%.1lfKm",model.distance];
    _goLabel.text =[NSString stringWithFormat:@"%ld人去过",(long)model.visited_count];
}
@end
